<?php
/**
 * Unassign a message label
 * 
 */

use Orx\Mailer\MailBox\Message\Label;
$xview = Xview::instance();
$inlineid = $xview->val('inlineid');
if(!empty($inlineid)) {
	try {
		$label = Fox\Dao::load(Label::className(),$inlineid);
		$label->delete();
		Fox\Message::Success(Msg(Hive::BUNDLE,Hive::LABEL_HAS_BEEN_REMOVED));
	} catch(Fox\Object\Exception\Save $e) {
		Fox\Message::Error($e);
	}
	
}
return $xview->messages(true,true);